Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helper function to bind same random port multiple times in Netty #97

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

szysas
Copy link
Collaborator

@szysas szysas commented Aug 30, 2024

No description provided.

Copy link

codecov bot commented Aug 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.18%. Comparing base (7102a2e) to head (c22473b).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #97   +/-   ##
=========================================
  Coverage     93.17%   93.18%           
- Complexity     2019     2025    +6     
=========================================
  Files           134      134           
  Lines          4569     4575    +6     
  Branches        617      618    +1     
=========================================
+ Hits           4257     4263    +6     
  Misses          171      171           
  Partials        141      141           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@szysas szysas marked this pull request as ready for review August 30, 2024 08:21
@szysas szysas requested a review from akolosov-n August 30, 2024 08:21

// for random port update bootstrap with actual port but only if SO_REUSEPORT is enabled
if (bindToRandomPort() && reusePortIsEnabled()) {
bootstrap.localAddress(channel.localAddress());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work so, that after the first server using this bootstrap is started, then all the following server using the same bootstrap will use the updated version of it (with the port properly set)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly that way.

@szysas szysas merged commit c9bf0bb into master Aug 30, 2024
6 checks passed
@szysas szysas deleted the multi-netty-random-port branch August 30, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants